﻿// Copyright (c)  YISH. All rights reserved.
// Licensed under the MIT License, See License.txt in the project root for license information.

namespace NSQL.Expressions.Functions
{
    public interface IFunctionVisitor<out T>
    {
        T Visit(ICountFunction expression);
        T Visit(IRoundFunction expression);
        T Visit(ISumFunction expression);
        T Visit(IMaxFunction expression);
        T Visit(IAvgFunction expression);
        T Visit(IMinFunction expression);
        T Visit(IMedianFunction expression);
        T Visit(IStdDevFunction expression);
        T Visit(IVarianceFunction expression);
        T Visit(IToCharFunction expression);
        T Visit(ITrimFunction expression);
        T Visit(ILengthFunction expression);
        T Visit(ICastFunction expression);
        T Visit(IToNumberFunction expression);
        T Visit(ISubStringFunction expression);
        T Visit(INvlFunction expression);
        T Visit(IPadFunction expression);
        T Visit(ILeftFunction expression);
        T Visit(IRightFunction expression);
        T Visit(IUpperFunction expression);
        T Visit(ILowerFunction expression);
        T Visit(IReplaceFunction expression);
        T Visit(IExtractFunction expression);
        T Visit(IConcatFunction expression);
        T Visit(IReverseFunction expression);
        T Visit(IToDatetimeFunction expression);
        T Visit(IAddIntervalFunction expression);
        
        T Visit(IStartWithFunction expression);
        T Visit(IEndWithFunction expression);
        T Visit(IContainsFunction expression);

        T Visit(ISinFunction expression);
        T Visit(ICosFunction expression);
        T Visit(ITanFunction expression);
        T Visit(IAbsFunction expression);
        T Visit(ISignFunction expression);
        T Visit(ISqrtFunction expression);
        T Visit(ILogFunction expression);
        T Visit(IPowFunction expression);
        T Visit(IRankFunction expression);
        T Visit(ICoalesceFunction expression);
        T Visit(IDecodeFunction expression);
        T Visit(ICeilFunction expression);
        T Visit(IFloorFunction expression);
        
        T Visit(IPercentileFunction expression);
        T Visit(IFormatFunction expression);
        
        T Visit(IDiffFunction expression);
    }
    
    public interface IFunctionVisitor
    {
        void Visit(ICountFunction expression);
        void Visit(IRoundFunction expression);
        void Visit(ISumFunction expression);
        void Visit(IMaxFunction expression);
        void Visit(IAvgFunction expression);
        void Visit(IMinFunction expression);
        void Visit(IMedianFunction expression);
        void Visit(IStdDevFunction expression);
        void Visit(IVarianceFunction expression);
        void Visit(IToCharFunction expression);
        void Visit(ITrimFunction expression);
        void Visit(ILengthFunction expression);
        void Visit(ICastFunction expression);
        void Visit(IToNumberFunction expression);
        void Visit(ISubStringFunction expression);
        void Visit(INvlFunction expression);
        void Visit(IPadFunction expression);
        void Visit(ILeftFunction expression);
        void Visit(IRightFunction expression);
        void Visit(IUpperFunction expression);
        void Visit(ILowerFunction expression);
        void Visit(IReplaceFunction expression);
        void Visit(IExtractFunction expression);
        void Visit(IConcatFunction expression);
        void Visit(IReverseFunction expression);
        void Visit(IToDatetimeFunction expression);
        void Visit(IAddIntervalFunction expression);
        
        void Visit(IStartWithFunction expression);
        void Visit(IEndWithFunction expression);
        void Visit(IContainsFunction expression);

        void Visit(ISinFunction expression);
        void Visit(ICosFunction expression);
        void Visit(ITanFunction expression);
        void Visit(IAbsFunction expression);
        void Visit(ISignFunction expression);
        void Visit(ISqrtFunction expression);
        void Visit(ILogFunction expression);
        void Visit(IPowFunction expression);
        void Visit(IRankFunction expression);
        void Visit(ICoalesceFunction expression);
        void Visit(IDecodeFunction expression);
        void Visit(ICeilFunction expression);
        void Visit(IFloorFunction expression);
        
        void Visit(IPercentileFunction expression);
        void Visit(IFormatFunction expression);
        
        void Visit(IDiffFunction expression);
    }
}